package com.lysj.print.print.repository;

import com.lysj.admin.utils.spring.foundation.base.BaseRepository;
import com.lysj.print.print.domain.AreaDetail;
import com.lysj.print.print.domain.PrinterRotation;
import com.lysj.print.print.vo.PrintAreaVo;
import com.lysj.print.print.vo.PrinterRotationVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @ Author ：drj.
 * @ Date  ：Created in 10:32 2019/3/21
 * @ Description: 打印机轮训数据dao
 **/

public interface PrinterRotationRepository extends BaseRepository<PrinterRotation> {

//    @Query(value = "SELECT NEW  com.lysj.print.print.vo.PrinterRotationVo(p.name,p.amount,p.unitPrice,p.subtotal) FROM PrinterRotation p   WHERE p.printerId=?1 AND p.delFlag=1 AND p.status=1 AND p.dataType=2 ORDER BY p.createTime DESC ")
//    List<PrinterRotationVo> findPrinterRotationList(String printerId);

    List<PrinterRotation> findByPrinterIdAndStatusAndDataType(String printerId, Integer status, Integer dataType);

}
